/**
 * Copyright (c) 2020 kedacom
 * OpenATC is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 * http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 **/
import store from '../../store'
let images = [
  {
    id: 1,
    // name: 'East-Straight',
    name: 'edge.phase.es',
    // img: require('./images/East-Straight.svg'),
    class: 'iconfont icon-dongzhihang'
  },
  {
    id: 2,
    // name: 'East-Left',
    name: 'edge.phase.el',
    // img: require('./images/East-Left.svg'),
    class: 'iconfont icon-dongzuozhuan'
  },
  {
    id: 3,
    // name: 'East-Right',
    name: 'edge.phase.er',
    // img: require('./images/East-Right.svg'),
    class: 'iconfont icon-dongyouzhuan'
  },
  {
    id: 4,
    // name: 'East-Back',
    name: 'edge.phase.eb',
    // img: require('./images/East-Back.svg'),
    class: 'iconfont icon-dongdiaotou'
  },
  {
    id: 5,
    // name: 'West-Straight',
    name: 'edge.phase.ws',
    // img: require('./images/West-Straight.svg'),
    class: 'iconfont icon-xizhihang'
  },
  {
    id: 6,
    // name: 'West-Left',
    name: 'edge.phase.wl',
    // img: require('./images/West-Left.svg'),
    class: 'iconfont icon-xizuozhuan'
  },
  {
    id: 7,
    // name: 'West-Right',
    name: 'edge.phase.wr',
    // img: require('./images/West-Right.svg'),
    class: 'iconfont icon-xiyouzhuan'
  },
  {
    id: 8,
    // name: 'West-Back',
    name: 'edge.phase.wb',
    // img: require('./images/West-Back.svg'),
    class: 'iconfont icon-xidiaotou'
  },
  {
    id: 9,
    // name: 'North-Straight',
    name: 'edge.phase.ns',
    // img: require('./images/North-Straight.svg'),
    class: 'iconfont icon-beizhihang'
  },
  {
    id: 10,
    // name: 'North-Left',
    name: 'edge.phase.nl',
    // img: require('./images/North-Left.svg'),
    class: 'iconfont icon-beizuozhuan'
  },
  {
    id: 11,
    // name: 'North-Right',
    name: 'edge.phase.nr',
    // img: require('./images/North-Right.svg'),
    class: 'iconfont icon-beiyouzhuan'
  },
  {
    id: 12,
    // name: 'North-Back',
    name: 'edge.phase.nb',
    // img: require('./images/North-Back.svg'),
    class: 'iconfont icon-beidiaotou'
  },
  {
    id: 13,
    // name: 'South-Straight',
    name: 'edge.phase.ss',
    // img: require('./images/South-Straight.svg'),
    class: 'iconfont icon-nanzhihang'
  },
  {
    id: 14,
    // name: 'South-Left',
    name: 'edge.phase.sl',
    // img: require('./images/South-Left.svg'),
    class: 'iconfont icon-nanzuozhuan'
  },
  {
    id: 15,
    // name: 'South-Right',
    name: 'edge.phase.sr',
    // img: require('./images/South-Right.svg'),
    class: 'iconfont icon-nanyouzhuan'
  },
  {
    id: 16,
    // name: 'South-Back',
    name: 'edge.phase.sb',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-nandiaotou'
  },
  {
    id: 17,
    // name: 'South-Back',
    name: 'edge.phase.ses',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-dongnanzhihang'
  },
  {
    id: 18,
    // name: 'South-Back',
    name: 'edge.phase.sel',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-dongnanzuozhuan'
  },
  {
    id: 19,
    // name: 'South-Back',
    name: 'edge.phase.ser',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-dongnanyouzhuan'
  },
  {
    id: 20,
    // name: 'South-Back',
    name: 'edge.phase.seb',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-dongnandiaotou'
  },
  {
    id: 21,
    // name: 'South-Back',
    name: 'edge.phase.sws',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-xinanzhihang'
  },
  {
    id: 22,
    // name: 'South-Back',
    name: 'edge.phase.swl',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-xinanzuozhuan'
  },
  {
    id: 23,
    // name: 'South-Back',
    name: 'edge.phase.swr',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-xinanyouzhuan'
  },
  {
    id: 24,
    // name: 'South-Back',
    name: 'edge.phase.swb',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-xinandiaotou'
  },
  {
    id: 25,
    // name: 'South-Back',
    name: 'edge.phase.nes',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-dongbeizhihang'
  },
  {
    id: 26,
    // name: 'South-Back',
    name: 'edge.phase.nel',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-dongbeizuozhuan'
  },
  {
    id: 27,
    // name: 'South-Back',
    name: 'edge.phase.ner',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-dongbeiyouzhuan'
  },
  {
    id: 28,
    // name: 'South-Back',
    name: 'edge.phase.neb',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-dongbeidiaotou'
  },
  {
    id: 29,
    // name: 'South-Back',
    name: 'edge.phase.nws',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-xibeizhihang'
  },
  {
    id: 30,
    // name: 'South-Back',
    name: 'edge.phase.nwl',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-xibeizuozhuan'
  },
  {
    id: 31,
    // name: 'South-Back',
    name: 'edge.phase.nwr',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-xibeiyouzhuan'
  },
  {
    id: 32,
    // name: 'South-Back',
    name: 'edge.phase.nwb',
    // img: require('./images/South-Back.svg'),
    class: 'iconfont icon-xibeidiaotou'
  }
]
const pedimages = [
  {
    id: 1,
    name: 'edge.phase.eped',
    img: require('../../assets/sidewalk_type/east-ped.svg')
  // class: 'iconfont icon-donghangren'
  },
  {
    id: 2,
    name: 'edge.phase.wped',
    img: require('../../assets/sidewalk_type/west-ped.svg')
  // class: 'iconfont icon-xihangren'
  },
  {
    id: 3,
    name: 'edge.phase.sped',
    img: require('../../assets/sidewalk_type/south-ped.svg')
  // class: 'iconfont icon-nanhangren'
  },
  {
    id: 4,
    name: 'edge.phase.nped',
    img: require('../../assets/sidewalk_type/north-ped.svg')
  // class: 'iconfont icon-beihangren'
  },
  {
    id: 5,
    name: 'edge.phase.etped',
    img: require('../../assets/sidewalk_type/east-top.svg')
  // class: 'iconfont icon-xihangren'
  }, {
    id: 6,
    name: 'edge.phase.ebped',
    img: require('../../assets/sidewalk_type/east-bottom.svg')
  // class: 'iconfont icon-donghangren'
  },
  {
    id: 7,
    name: 'edge.phase.wtped',
    img: require('../../assets/sidewalk_type/west-top.svg')
  // class: 'iconfont icon-beihangren'
  },
  {
    id: 8,
    name: 'edge.phase.wbped',
    img: require('../../assets/sidewalk_type/west-bottom.svg')
  // class: 'iconfont icon-nanhangren'
  },
  {
    id: 9,
    name: 'edge.phase.slped',
    img: require('../../assets/sidewalk_type/south-left.svg')
  // class: 'iconfont icon-xihangren'
  }, {
    id: 10,
    name: 'edge.phase.srped',
    img: require('../../assets/sidewalk_type/south-right.svg')
  // class: 'iconfont icon-donghangren'
  },
  {
    id: 11,
    name: 'edge.phase.nlped',
    img: require('../../assets/sidewalk_type/north-left.svg')
  // class: 'iconfont icon-beihangren'
  },
  {
    id: 12,
    name: 'edge.phase.nrped',
    img: require('../../assets/sidewalk_type/north-right.svg')
  // class: 'iconfont icon-nanhangren'
  },
  {
    id: 13,
    name: 'edge.phase.xrped',
    img: require('../../assets/sidewalk_type/X-right.svg')
  // class: 'iconfont icon-xihangren'
  }, {
    id: 14,
    name: 'edge.phase.xlped',
    img: require('../../assets/sidewalk_type/X-left.svg')
  // class: 'iconfont icon-donghangren'
  },
  {
    id: 15,
    name: 'edge.phase.snped',
    img: require('../../assets/sidewalk_type/south-north-ped.svg')
  // class: 'iconfont icon-nanhangren'
  },
  {
    id: 16,
    name: 'edge.phase.ewped',
    img: require('../../assets/sidewalk_type/east-west-ped.svg')
  // class: 'iconfont icon-beihangren'
  },
  {
    id: 17,
    name: 'edge.phase.secw',
    img: require('../../assets/sidewalk_type/southeast-crosswalk.svg')
  },
  {
    id: 18,
    // name: 'South-Back',
    name: 'edge.phase.swcw',
    img: require('../../assets/sidewalk_type/southwest-crosswalk.svg')
    // class: 'iconfont icon-xinanrenhanghengdao'
  },
  {
    id: 19,
    // name: 'South-Back',
    name: 'edge.phase.necw',
    img: require('../../assets/sidewalk_type/northeast-crosswalk.svg')
    // class: 'iconfont icon-dongbeirenhanghengdao'
  },
  {
    id: 20,
    // name: 'South-Back',
    name: 'edge.phase.nwcw',
    img: require('../../assets/sidewalk_type/northwest-crosswalk.svg')
    // class: 'iconfont icon-xibeirenhanghengdao'
  },
  {
    id: 21,
    // name: 'South-Back',
    name: 'edge.phase.secwt',
    img: require('../../assets/sidewalk_type/southeast-crosswalk-up.svg')
    // class: 'iconfont icon-dongnanshang'
  },
  {
    id: 22,
    // name: 'South-Back',
    name: 'edge.phase.secwb',
    img: require('../../assets/sidewalk_type/southeast-crosswalk-down.svg')
    // class: 'iconfont icon-dongnanxia'
  },
  {
    id: 23,
    // name: 'South-Back',
    name: 'edge.phase.swcwt',
    img: require('../../assets/sidewalk_type/southwest-crosswalk-up.svg')
    // class: 'iconfont icon-xinanshang'
  },
  {
    id: 24,
    // name: 'South-Back',
    name: 'edge.phase.swcwb',
    img: require('../../assets/sidewalk_type/southwest-crosswalk-down.svg')
    // class: 'iconfont icon-xinanxia'
  },
  {
    id: 25,
    // name: 'South-Back',
    name: 'edge.phase.necwt',
    img: require('../../assets/sidewalk_type/northeast-crosswalk-up.svg')
    // class: 'iconfont icon-dongbeishang'
  },
  {
    id: 26,
    // name: 'South-Back',
    name: 'edge.phase.necwb',
    img: require('../../assets/sidewalk_type/northeast-crosswalk-down.svg')
    // class: 'iconfont icon-dongbeixia'
  },
  {
    id: 27,
    // name: 'South-Back',
    name: 'edge.phase.nwcwt',
    img: require('../../assets/sidewalk_type/northwest-crosswalk-up.svg')
    // class: 'iconfont icon-xibeishang'
  },
  {
    id: 28,
    // name: 'South-Back',
    name: 'edge.phase.nwcwb',
    img: require('../../assets/sidewalk_type/northwest-crosswalk-down.svg')
    // class: 'iconfont icon-xibeixia'
  }
]
const getPhase = () => {
  if (store.getters.roadDirection === 'left') {
    // 左行下，掉头图标替换
    images.forEach((img) => {
      if (img.id === 4) {
        img.class = 'iconfont icon-dongtiaotou-yinni'
      }
      if (img.id === 8) {
        img.class = 'iconfont icon-xitiaotou-yinni'
      }
      if (img.id === 12) {
        img.class = 'iconfont icon-beitiaotou-yinni'
      }
      if (img.id === 16) {
        img.class = 'iconfont icon-nantiaotou-yinni'
      }
    })
  }
  return images
}

export {pedimages, getPhase}
